<%@ page contentType="text/html; charset=UTF-8" language="java" import="com.util.*,java.util.*" errorPage="/error.jsp" %>
<%@ page import="com.beans.log.*" %>
<%@ page import="com.business.log.*" %>
<%@ page import="com.beans.link.*" %>
<%@ page import="com.business.link.*" %>
<%@ page import="com.beans.user.*" %>
<%@ page import="com.business.user.*" %>
<%
  
      response.setHeader("Pragma","No-cache");
       response.setHeader("Cache-Control","no-cache");
       response.setDateHeader("Expires",0);
    String username=request.getPathInfo();
	username=username.replace("/","");
	UserListBus uis=new UserListBus();
	UserInfo ui=uis.getUserInfo(username);
	LogListBus llb=new LogListBus();
	LogReplyBus lrb=new LogReplyBus();
	LogTypeBus ltb=new LogTypeBus();
	String title=username+"的博客";
	if(ui==null||ui.getUsername().equals("")) {	
%>
	<jsp:forward page="/error.jsp?name=nouser" />
	
<%
}
%>
<%@ include file="/header.jsp"%>

<body>
<div id=container>
<%@ include file="/top.jsp"%>
<div id=Tbody>
<div id=mainContent>
<div id=innermainContent>
<div id=mainContent-topimg></div>
  <%	
	    List logList=llb.getAllLogByShow(username);
	   for(int i=0;i<logList.size();i++) {
	  	 LogInfo li=(LogInfo)logList.get(i);
		 int typeId=Integer.parseInt(li.getLogtypeId());
		  List replyList=lrb.getReplyByLogNo(li.getLogNo());
	LogType lt=ltb.getLogTypeById(typeId);
	   %>
 <DIV class=Content>
<DIV class=Content-top>
<DIV class=ContentLeft></DIV>
<DIV class=ContentRight></DIV>
<H1 class=ContentTitle><IMG class=CateIcon style="MARGIN: 0px 2px -4px 0px" 
alt="" src="images/2.gif"><A class=titleA 
href="log/temp/<%=li.getLogNo()%>.html"><%=li.getLogTitle()%></A></H1>
<H2 class=ContentAuthor><%=li.getLogPostTime()%></H2></DIV>
<DIV id=log_346>
<DIV class=Content-body>
<%
	if(li.getLogContent().length()>300){
%>
日志摘要:<%=li.getLogIntro().equals("")?"无":li.getLogIntro()%>

<%	
	}else{
%>
<%=TextTools.html2txt(li.getLogContent())%>
<%
	}
%>
<P><A class=more 
href="log/temp/<%=li.getLogNo()%>.html">查看日志...</A></P>
</DIV>
<DIV class=Content-bottom>
<DIV class=ContentBLeft></DIV>
<DIV class=ContentBRight></DIV><%if(!lt.getLogtypeId().equals("")){%>分类:<A title="" 
href="show/<%=username%>/<%=lt.getLogtypeId()%>.html"><%=lt.getLogtypeName()%></A> |<%}%>回复次数: <%=replyList.size()%>|  
查看次数: <%=li.getViewnums()%> </DIV></DIV></DIV>
<%	
	}
%>
<div id=mainContent-bottomimg></div></div></div>
<%@ include file="/sidebar.jsp"%>
<%@ include file="/footer.jsp" %>
</body>
</html>